/*
 *  NodeGrid.h
 *  cocos3d-x
 *
 *  Created by Yezhiyong on 12-4-26.
 *  Copyright 2012 __MyCompanyName__. All rights reserved.
 *
 */

#ifndef __NODEGRID_H__
#define __NODEGRID_H__

#include "CC3Node.h"


/**
 * NodeGrid is a specialized node that creates and holds a number of copies of another node,
 * laid out in a square grid.
 */
class NodeGrid : public CC3Node
{
/**
 * Creates many copies of the specified template node, and lays them out on a square grid,
 * so that there are the specified number of nodes per side of the square.
 */
public:
	void populateWith(CC3Node* templateNode, unsigned int perSideCount);
	
	static NodeGrid* nodeWithName(const char* aName);

};

#endif //__NODEGRID_H__